import http from '@/utils/http/http'
import config from '../config'

const neteaseCloudMusicApi = config.neteaseCloudMusicApi;
const server = config.server;

export const _getSongSearch = params => http.$GET(`${neteaseCloudMusicApi}/cloudsearch`, params)
export const _getSongCanUse = params => http.$GET(`${neteaseCloudMusicApi}/check/music`, params)
export const _getSongLyric = params => http.$GET(`${neteaseCloudMusicApi}/lyric`, params)
export const _getSearchSuggest = params => http.$GET(`${neteaseCloudMusicApi}/search/suggest`, params)
export const _getSearchHot = params => http.$GET(`${neteaseCloudMusicApi}/search/hot/detail`, params)
export const _postLogin = params => http.$POST(`${server}/api/user/login`, params)
export const _postRegister = params => http.$POST(`${server}/api/user/register`, params)
export const _postUserDetail = params => http.$POST(`${server}/api/user/detail`, params)
export const _postAddSongOrder = params => http.$POST(`${server}/api/songOrders/addSongOrder`, params)
export const _postSongOrdeList = params => http.$POST(`${server}/api/songOrders/lists`, params)
export const _postDelSongOrder = params => http.$POST(`${server}/api/songOrders/delSongOrder`, params)
export const _getNowSong = params => http.$POST(`${server}/api/songOrders/nowSong`)
export const _postTopSong = params => http.$POST(`${server}/api/songOrders/topSong`, params)
export const _postLogout = params => http.$POST(`${server}/api/user/logout`, params)
export const _postEditUser = params => http.$POST(`${server}/api/user/editUser`, params)
export const _postChatList = params => http.$POST(`${server}/api/chat/lists`, params)
export const _getNewsong = params => http.$GET(`${neteaseCloudMusicApi}/personalized/newsong`, params)
// export const _getNewsong = params => http.$GET(`${neteaseCloudMusicApi}/top/song`, params)
export const _postAddOrderHistory = params => http.$POST(`${server}/api/songOrders/addOrderHistory`, params)
export const _postOrderHistoryList = params => http.$POST(`${server}/api/songOrders/historyLists`, params)
export const _postDelOrderHistory = params => http.$POST(`${server}/api/songOrders/delOrderHistory`, params)